<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/style.css">
    <style>
        .highter{
            color: brown;
        }

        .anot {
            color: darkblue;
        }
    </style>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
        // 样式的操作
       $(function(){
         $('input:eq(0)').click(function(){
            alert($('p').attr('class'));
         });
         $('input:eq(1)').click(function(){
            $('p').attr('class',"highter");
         });
         $('input:eq(2)').click(function(){
            $('p').addClass('anot');
         });
         $('input:eq(3)').click(function(){
            $('p').removeClass();
         });
         $('input:eq(4)').click(function(){
            $('p').removeClass('highter');
         });
         $('input:eq(5)').click(function(){
            $('p').toggleClass('anot');
         });

       })
    </script>
</head>
<body>
        <input type="button" value="输出样式"">
        <input type="button" value="设置样式">
        <input type="button" value="追加样式">
        <input type="button" value="删除所有的样式"">
        <input type="button" value="删除指定的样式">
        <input type="button" value="切换样式">

       <!-- JQuery是如何来操作节点 -->
       <p class="demoClass" title="这是一个段落标签">这是一个段落标签</p>
       <ul>
           <li title="Java">Java</li>
           <li title="Node">Node</li>
           <li title="AngularJS">AngularJS</li>
       </ul>
</body>
</html>